<?php echo $this->Html->script(array('users.view','actions','crumbs'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>
<?php echo $this->Html->css(array('events.view','provider.index.images','events.lists','lastminute-left','search-left','form','actions'),null,array('inline'=>false));?>

<?php $this->Html->addCrumb('Events',array('controller'=>'events','action'=>'index'))?>
<div id="crumbs" class="corners">
	<?php echo $this->Html->getCrumbs(Configure::read('Config.crumbs'),'Home')?>
</div>
<div class="content">
	<div class="left-column">
		<?php echo $this->Yachts->search_form_left();?>		
		<div class="clr"></div>	
		<?php echo $this->Yachts->lastminute(2);?>
		<div class="clr"></div>	
	</div>
	
	
	<div class="middle-column main-column">
		<div class="box corners events">		


							<h2><?php __('Events');?></h2>
							<?php echo $this->element('events'.DS.'events_lists');?>
							<p>
							<?php
							echo $this->Paginator->counter(array(
							'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
							));
							?>	</p>
						
							<div class="paging">
								<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
							 | 	<?php echo $this->Paginator->numbers();?>
						 |
								<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
							</div>
		</div>			
	</div>
	
	<div class="right-column">
	
		<?php if($session->check('Auth.User.id')) echo $this->element('user_main_left_menu')?>		
		
		<div class="box corners user-info">		
			<h2><?php echo __('My friends',true)?></h2>
			<?php echo $this->element('events'.DS.'my_friends')?>
			<div class="clr"></div>			
		</div>	
		<div class="shadow-left"></div>
		
		<div class="box corners user-info">		
			<h2><?php echo __('My events',true)?></h2>
			<?php echo $this->element('events'.DS.'my_events')?>
			<div class="clr"></div>			
		</div>	
		<div class="shadow-left"></div>
	</div>
</div>
						
						
						
<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>
<div class="actions main_actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Event', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Yacht Charters', true), array('controller' => 'yacht_charters', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Yacht Charters', true), array('controller' => 'yacht_charters', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Posts', true), array('controller' => 'posts', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Post', true), array('controller' => 'posts', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Uploads', true), array('controller' => 'uploads', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Upload', true), array('controller' => 'uploads', 'action' => 'add')); ?> </li>
	</ul>
</div>
<?php }?>
<div class="clr"></div>